﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FraudMitigator
{
    class Letter
    {
        public string text { get; private set; }
        private DateTime now;

        public Letter()
        {
            text = "Error";
        }

        // First letter to be sent
        public Letter(string first, string last, string address, decimal amount, DateTime checkDate, string bankName, string payableTo, decimal feeAmount, string userName, string userAddress, string userPhone)
        {
            now = DateTime.Now;
            text = @"Date: " + now.Month + "/" + now.Day + "/" + now.Year + @"

" + first + " " + last + @"

" + address + @"

Dear " + first + " " + last + @":

The check you wrote for $" + amount + @", dated " + checkDate.Month + "/" + checkDate.Day + "/" + checkDate.Year + @", was returned by " + bankName + @" because your account had insufficient funds.

I recognize that this might have been a mistake and will give you 30 days to make full payment of the check. The check, made payable to " + payableTo + @" must be repaid in full, in cash, and in person together with $" + feeAmount + @" in bank and mailing fees. If payment is not received within 30 days, legal action will be taken against you.

Please bring your payment to:

" + userName + @"

" + userAddress + "   " + userPhone + @"

Thank you,



";
        }

        // Second letter to be sent
        public Letter(string first, string last, string address, decimal amount, DateTime checkDate, decimal feeAmount, string userName, string userAddress, string userPhone)
        {
            now = DateTime.Now;
            text = @"Date: " + now.Month + "/" + now.Day + "/" + now.Year + @"

" + first + " " + last + @"

" + address + @"

Dear " + first + " " + last + @":

My previous letter addressed a check written for $" + amount + @" and dated " + checkDate.Month + "/" + checkDate.Day + "/" + checkDate.Year + @" and warned you that legal action would be taken against you if payment was not received within 30 days of the mailing of the letter. Fifteen days have passed and I have not received payment. If I do not receive the amount listed above in addition to a  $" + feeAmount + @" I will be forced to initiate a court case.

Please bring your payment to:

" + userName + @"

" + userAddress + "   " + userPhone + @"

Thank you,



";
        }

        // Third letter to be sent
        public Letter(string first, string last, string address, DateTime checkDate, string userName, string userAddress, string userPhone)
        {
            now = DateTime.Now;
            text = @"Date: " + now.Month + "/" + now.Day + "/" + now.Year + @"

" + first + " " + last + @"

" + address + @"

Dear " + first + " " + last + @":

This is the third letter sent to you in regards to the check used on " + checkDate.Month + "/" + checkDate.Day + "/" + checkDate.Year + @". You have not paid your bill within the 30 days provided. I have initiated a court case against you and expect to see you there.

" + userName + @"

" + userAddress + "   " + userPhone + @"

Thank you,



";
        }
    }
}
